package cn.hxsteel.purview.model.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import cn.hxsteel.purview.core.base.BaseDAO;
import cn.hxsteel.purview.model.po.RoleRefActionPO;

/**
 * 角色、动作关系的数据访问对象
 */
@Repository
public class RoleActionDAO extends BaseDAO< RoleRefActionPO, Integer >
{
    /**
     * 查询指定用户标识的角色、动作关系持久对象的列表
     * 
     * @param uid 用户标识
     * @return
     */
    public List< RoleRefActionPO > selPermitList( int uid )
    {
	return find( "select a from RoleRefActionPO as a, CustomerRefRolePO as b where a.roleID = b.roleID and b.uid = ?", uid );
    }
    
    /**
     * 改变指定角色标识的动作标识组
     * 
     * @param roleID 角色标识
     * @param actionIDGroup 动作标识组
     * @return
     */
    public boolean chgRoleActionIDGroup( int roleID, String actionIDGroup )
    {
	return false;
	// return execProc( "p_RoleAction_chg", roleID, actionIDGroup );
    }
}